package com.ifcreate.infowell.sys.conf;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author chenzedeng
 * @Email yustart@foxmail.com
 * @Create 2020-07-31 3:27 下午
 */
//@SpringBootApplication
public class SysWebConfiguration implements WebMvcConfigurer {

    @Bean
    public SysWebInterceptor createAppInterceptor() {
        return new SysWebInterceptor();
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(createAppInterceptor())
                .addPathPatterns("/sys/**");
    }
}
